﻿/// <reference path="../../release/jsApp.js"/>

function ContextBase(app, gateway)
{
	this.app = app;
	this.gateway = gateway;
	this.cacheBlackList = [];
}
ContextBase.Version = 100;
ContextBase.extend(ASObject, { type: 'AjaxStack.ContextBase' },
	function(p)
	{
		p.dispatchEvent = function(eventName, source, args)
		{
			this.app.dispatchEvent(eventName, source, args);
		}
		p.getCacheBlackList = function()
		{
			return this.cacheBlackList;
		}
		p.setCacheBlackList = function()
		{
			this.cacheBlackList = arguments;
		}
		p.createRequest = function(withArgs)
		{
			var request = { Version: this.constructor.Version || ContextBase.Version };
			if (withArgs)
			{
				O.merge(request, withArgs);
			}
			return request;
		}
	}
);
